package com.mnemonic;

import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;

import javax.imageio.ImageIO;

/**
 * 所有的图片
 * 
 * @author lifeng
 * @date 2021/05/15
 */
public class Images {

    public static Image logo = Toolkit.getDefaultToolkit().getImage(Images.class.getResource("images/logo.png"));
    public static Image mineBg = Toolkit.getDefaultToolkit().getImage(Images.class.getResource("images/bg.png"));
    public static Image mineImage = Toolkit.getDefaultToolkit().getImage(Images.class.getResource("images/bomb.jpg"));
    public static Image bombImage = Toolkit.getDefaultToolkit().getImage(Images.class.getResource("images/bomb0.jpg"));
    public static Image flagImage = Toolkit.getDefaultToolkit().getImage(Images.class.getResource("images/flag.jpg"));
    public static Image questionImage =
        Toolkit.getDefaultToolkit().getImage(Images.class.getResource("images/flag2.jpg"));
    public static Image initImage = Toolkit.getDefaultToolkit().getImage(Images.class.getResource("images/init.jpg"));

    public static Image[] images = {Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/0.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/1.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/2.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/3.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/4.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/5.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/6.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/7.jpg")),
        Toolkit.getDefaultToolkit().getImage(MainPage.class.getResource("images/8.jpg"))};

    public static BufferedImage[] explodes = new BufferedImage[16];

    static {
        try {
            for (int i = 0; i < 16; i++) {
                explodes[i] = ImageIO.read(MainPage.class.getResourceAsStream("images/e" + (i + 1) + ".gif"));
            }
        } catch (Exception e) {
        }
    }
}
